{% extends 'base.html' %}
{% block content %}
        <fieldset >
            <legend>{{ username }}--修改sudo</legend>
            <form class="form-horizontal" role="form" method="post" action="/chgSudo/" >
               <div class="row">
                  <div class="col-lg-6">
                    <div class="input-group">
                      <input type="text" name="username" value="{{ username }}" hidden="hidden">
                      <input type="text" class="form-control" name="add_host" placeholder="主机IP,多个逗号分隔">
                      <span class="input-group-btn">
                        <button class="btn btn-success" type="submit">新增主机</button>
                      </span>
                    </div><!-- /input-group -->
                  </div><!-- /.col-lg-6 -->
                </div><!-- /.row -->
            </form>
            <br>

            <form class="form-horizontal" role="form" method="post" action="/chgSudo/" >
               <div class="row">
                  <div class="col-lg-6">
                    <div class="input-group">
                        <input type="text" name="username" value="{{ username }}" hidden="hidden">
                      <input type="text" class="form-control" name="del_host" placeholder="主机IP,多个逗号分隔">
                      <span class="input-group-btn">
                        <button class="btn btn-primary" type="submit">删除主机</button>
                      </span>
                    </div><!-- /input-group -->
                  </div><!-- /.col-lg-6 -->
                </div><!-- /.row -->
            </form>
            <br>

            <form class="form-horizontal" role="form" method="post" action="/chgSudo/" >
               <div class="row">
                  <div class="col-lg-6">
                    <div class="input-group">
                      <input type="text" name="username" value="{{ username }}" hidden="hidden">
                      <input type="text" class="form-control" name="add_cmd" placeholder="添加命令,多个逗号分隔">
                      <span class="input-group-btn">
                        <button class="btn btn-info" type="submit">添加命令</button>
                      </span>
                    </div><!-- /input-group -->
                  </div><!-- /.col-lg-6 -->
                </div><!-- /.row -->
            </form>
            <br>

            <form class="form-horizontal" role="form" method="post" action="/chgSudo/?delCMD=1" >
               <div class="row">
                  <div class="col-lg-6">
                    <div class="input-group">
                      <input type="text" name="username" value="{{ username }}" hidden="hidden">
                      <input type="text" class="form-control" name="del_cmd" placeholder="删除命令,多个逗号分隔">
                      <span class="input-group-btn">
                        <button class="btn btn-danger" type="submit">删除命令</button>
                      </span>
                    </div><!-- /input-group -->
                  </div><!-- /.col-lg-6 -->
                </div><!-- /.row -->
            </form>
        </fieldset>
{% endblock %}